package com.cci.kangdao.controller;

import com.cci.kangdao.service.TrackService;
import com.cci.kangdao.utilTool.ParameterTool;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

@Controller
public class WorkOrderTrackController {

    private Logger log = Logger.getLogger(this.getClass().getName());

    @Resource
    private TrackService trackService;

    /**
     * 获取工单轨迹信息
     *
     * @param request  请求入参
     * @param response 相应出参
     * @return null
     */
    @RequestMapping("/getTrackInfos.aspx")
    public String getTrackInfos(HttpServletRequest request, HttpServletResponse response) {
        try {
            Map<String, Object> map = ParameterTool.getParameterRequest(request, true);
            map.put("request", request);
            map.put("response", response);
            trackService.getOrderTrackInfos(map);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
        return null;
    }

}
